﻿module Ast

type Grammar = Definition list

and  Definition = Def of string * Token

and  Token =
     | Identifier of string
     | Integer of string
     | Float of string
     | String of string
     | Operator of string
     | Pragma of string
     | Symbol of char
     override this.ToString() =
        match this with
        | Identifier s -> "Ident     | " + s
        | Integer i    -> "Integer   | " + i
        | Float f      -> "Float     | " + f
        | String s     -> "String    | " + "\"" + s + "\""
        | Operator o   -> "Operator  | " + o
        | Pragma p     -> "Pragma    | " + "#" + p
        | Symbol c     -> "Symbol    | " + (string)c